package com.zhongyu.consumer.service;

import com.zhongyu.comm.vo.DetailVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

@Slf4j
@Component     //放到spring容器中
public class DetailClientImpl implements DetailClientService {
    @Override
    public List<DetailVo> searchAll() {
        log.debug("熔断器打开");
        List<DetailVo> list = new ArrayList<>();
        DetailVo vo = new DetailVo();
        vo.setAuthor("小");
        vo.setSummary("null");
        vo.setCreateDate(LocalDate.now());
        list.add(vo);
        return list;
    }

    @Override
    public int del(int id) {
        log.debug("熔断器打开 ");
        return 0;
    }
}
